#define _CRT_SECURE_NO_WARNINGS 1
#include "test.h"
#include <List>
class A
{
public:
	void print() const
	{
		std::cout << _a << "\n";
	}
	int print()
	{
		std::cout << _a << "\n";
		return 0;
	}
	int _a = 1;
};
void Test1()
{
	test::List<int> list;
	list.push_back(1);
	list.push_back(2);
	list.push_back(3);
	list.push_back(4);
	list.push_front(1);
	list.push_front(2);
	list.push_front(3);
	list.push_front(4);

	list.pop_back();
	//list.pop_front();
	//list.erase(list.begin());
	//list.erase(--list.end());
	//list.insert(list.begin(), 1);
	//auto it = list.begin();
	//while (it != list.end())
	//{
	//	std::cout << *it << " ";
	//	it++;
	//}
	//std::cout << std::endl;
	auto it = list.end();
	--it;
	while (it != list.end())
	{
		std::cout << *(it--) << " ";
	}
	std::cout << std::endl;
}

void Test2()
{
	test::List<int>list;
	//test::List<int>::const_iterator it = list.cbegin();
	list.push_back(1);
	list.push_back(2);
	list.push_back(3);
	list.push_back(4);
	list.push_front(1);
	list.push_front(2);
	list.push_front(3);
	list.push_front(4);
	auto it = list.rend();
	it--;
	while (it != list.rend())
	{
		std::cout << *(it--) << " ";
	}
	std::cout << std::endl;
}
int main()
{
	Test2();
	return 0;
}